package guiservice.server.controls;

import lombok.Getter;
import lombok.Setter;

import javax.swing.*;
import java.awt.*;

public class Button extends Control implements guiservice.common.controls.Button {

    private JButton button;

    private String text;

    public Button(long id, long owner) {
        super(id, owner, guiservice.common.controls.Button.class.getCanonicalName());
        button = new JButton();
    }

    @Override
    protected Component getComponent() {
        return button;
    }

    @Override
    public String getText() {
        return button.getText();
    }

    @Override
    public void setText(String text) {
        button.setText(text);
    }
}
